library(ggplot2)
library(ggalt)

p1 <- ggplot(mtcars, aes(x = drat, y = mpg, col = factor(vs), size = qsec)) +
  geom_point() +
  geom_smooth(method = "loess", se = FALSE) +
  labs(title = "Scatter", subtitle = "without circle", x = "drat", y = "mpg")

# Filter the data that should be encircled
mtcars.sel <- mtcars[mtcars$drat > 2.5 & mtcars$drat <= 4.3 &
                       mtcars$mpg > 20 & mtcars$mpg <= 26, ]

p2 <- p1 + geom_encircle(aes(x = drat, y = mpg), data = mtcars.sel,
                         color = "red", size = 2, expand = 0.08)
p2
